﻿namespace Person
{
    class Person
    {
        private string name;
        private int? age;

        public Person(string name) 
        {
            this.name = name;
            this.age = null;
        }

        public Person(string name, int? age) : this(name)
        {
            this.age = age;
        }

        public override string ToString()
        {
            string text ="Name: "+  this.name + "\n" + "Age: ";

            if (this.Age == null)
            {
                text += "This person age was not specified";
            }
            else 
            {
                text += Age.ToString();
            }
            return text;
        }

        public int? Age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }
    }
}
